home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9802 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  897 b 

  1. Path: news-m01.ny.us.ibm.net!usenet
  2. From: schlaep@ibm.net (Patrick Schlaepfer)
  3. Newsgroups: comp.lang.c++
  4. Subject: Reading text file
  5. Date: Mon, 04 Mar 1996 16:35:33 GMT
  6. Message-ID: <4hf5ld$1sgu@news-s01.ny.us.ibm.net>
  7. NNTP-Posting-Host: slip139-92-18-142.pt.uk.ibm.net
  8. X-Newsreader: Forte Free Agent 1.0.82
  9.  
  10. What's the easiest way of reading a text file, such
  11. as
  12.  
  13. Text1, 122.44, 234.3,231,231
  14. Text2, 234.32, 344,2,231,122
  15.   |       |      |    |   |
  16. char1   float  float float float
  17.  
  18. into variables.
  19.  
  20. The fields are seperated by a comma.
  21.  
  22. I tried with fopen maybe CFileClass will also do the
  23. job. I could read the whole line, but then I came
  24. into trouble.
  25.  
  26. Regards 
  27. Pat
  28.  
  29. ------------------------------------------------
  30.     _/   _/  _/_/_/     Patrick Schlaepfer
  31.    _/_/ _/    _/        Schulstrasse 12
  32.   _/ _/_/    _/         CH-89262 Bergdietikon
  33.  _/   _/    _/ does it! patrick@schlaepferag.ch
  34.  
  35.